package com.yxq.springboot.dao;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.yxq.springboot.bean.SpringBootUserLog;

/**
 * 
 * @author yxq
 *
 */
public interface SpringBootUserLogDao extends JpaRepository<SpringBootUserLog, Integer> {

	/**
	 * @param string
	 * @return
	 */
	@Query(value = "select u from SpringBootUserLog u where u.userName=?1")
	List<SpringBootUserLog> findByUserName(String userName);

	/**
	 * @param string
	 * @param string2
	 * @return
	 */
	List<SpringBootUserLog> findByUserNameAndUserIp(String string, String string2);

	/**
	 * @param exampl
	 * @param pageable
	 * @return
	 */
	Page<SpringBootUserLog> findByUserName(String userName, Pageable pageable);

}
